<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body>
    <script>
      let hd = "houdunren.com";
      //slice substr substring
      // console.log(hd.slice(1));
      // console.log(hd.substring(1));
      // console.log(hd.substr(1));

      // console.log(hd.slice(1, 3));
      // console.log(hd.substring(1, 3));
      // console.log(hd.substr(1, 3));

      console.log(hd.slice(-3, -1));
      console.log(hd.substring(-3, -1));
      console.log(hd.substr(-3, 2));
    </script>
  </body>
</html>
